<?php
/********************************************************
** Copyright 2010-2013. Todos los derechos reservados. **
** Desarrollado y Gestionado por:					   **
** Sugey Quintero (Analista)						   **
** José G. De Freitas (Programador)					   **
** Klaudia Uribe (Diseñadora Web)					   **
** Cesar Isturiz (Diseñador Web)					   **
**				S E A  v1.0							   **
*********************************************************/

session_start();
include("conexion.php");

	if (isset($_SESSION['name']) and isset($_SESSION['tiempo'])) {
        include("Tiempo.php");
		date_default_timezone_set('America/Caracas'); setlocale(LC_TIME, 'spanish');
		$usuario = $_SESSION['name'];
		$fecha = date("Y-m-d H:i:s");
		$auditoria = mysql_query("INSERT INTO auditoria SELECT '$usuario', '$fecha' , 'Registro de estudiante nuevo' ");

    }else {
		echo "<script>alert('Debe ingresar al sistema primero');</script>";
		echo "<script>document.location.href='index.php';</script>";
	}

$cedula = $_GET['cedula'];
if ($cedula){
	$sql = mysql_query("SELECT * FROM representante WHERE Cedula='$cedula'");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Estudiante Nuevo</title>
<link rel="shortcut icon" type="image/x-icon" href="../favicon.ico">
<link href="style.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="js/funciones.js"></script>
<!-- calendario-->
<link rel="stylesheet" type="text/css" href="src/css/jscal2.css">
<link rel="stylesheet" type="text/css" href="src/css/border-radius.css">
<link rel="stylesheet" type="text/css" href="src/css/steel/steel.css">
<script type="text/javascript" src="src/js/jscal2.js"></script>
<script type="text/javascript" src="src/js/lang/es.js"></script>
<!-- fin calendario-->
<!-- botones-->
<link type="text/css" href="js/css/smoothness/jquery-ui-1.8.16.custom.css" rel="Stylesheet" />
<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.16.custom.min.js"></script> 
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/ValidarEstNuevo.js"></script>
<script>
var j$ = jQuery.noConflict();
j$(document).ready(function(){
j$(".button").button();
Validar();
});

j$(function(){
	j$('#menu li a').click(function(event){
		var elem = j$(this).next();
		if(elem.is('ul')){
			event.preventDefault();
			j$('#menu ul:visible').not(elem).slideUp();
			elem.slideToggle();
		}
	});
});

j$(document).ready(function() {

	//When page loads...
	j$(".tab_content").hide(); //Hide all content
	j$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	j$(".tab_content:first").show(); //Show first tab content

	//On Click Event
	j$("ul.tabs li").click(function() {

		j$("ul.tabs li").removeClass("active"); //Remove any "active" class
		j$(this).addClass("active"); //Add "active" class to selected tab
		j$(".tab_content").hide(); //Hide all tab content

		var activeTab = j$(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
		j$(activeTab).fadeIn(); //Fade in the active ID content
		return false;
	});

});


function comprobar_r(){
  var url = 'http://127.0.0.1/sistema/sistema_escuela/comprobar_r.php';
  //var url = 'http://sistemalamora.no-ip.org/sistema/sistema_escuela/comprobar_r.php';
  var pars= ('Cedula_r=' + document.getElementById('Cedula_r').value);
  var myAjax = new Ajax.Updater( 'comprobar_mensaje_r', url, { method: 'get', parameters: pars});
}

<!--
var nav4 = window.Event ? true : false;
function acceptNum(evt){   
var key = nav4 ? evt.which : evt.keyCode;   
return (key <= 13 || (key>= 48 && key <= 57));
}
//-->

icremento = 0;
function crear(obj) {

	field = document.getElementById('field'); 
	contenedor = document.createElement('tr'); 
	contenedor.id = 'div'+icremento; 
	field.appendChild(contenedor); 

	td = document.createElement('td');
	contenedor.appendChild(td);
	
	boton = document.createElement('input'); 
	boton.type = 'text'; 
	boton.name = 'Nombre_enf['+icremento+']'; 
	boton.size = '35';
	contenedor.appendChild(boton); 

	
	contenedor.appendChild(td);

	boton2 = document.createElement('textarea');
	//boton2.type = 'text';
	boton2.name = 'Descripcion_enf['+icremento+']'; 
	boton2.rows = '1';
	boton2.cols = '25';
	contenedor.appendChild(boton2);


	boton = document.createElement('img'); 
	boton.src = 'images/salir.jpg';
	boton.name = 'div'+icremento; 
	boton.onclick = function () {borrar(this.name)} 
	contenedor.appendChild(boton);
	icremento++;
}

function borrar(obj) {
	field = document.getElementById('field'); 
	field.removeChild(document.getElementById(obj)); 
}

function CedulaEscolar(Cedula){
	document.getElementById('Codigo').value = document.getElementById('calendar-inputField').value[12]+document.getElementById('calendar-inputField').value[13]+'01';
		for (i=2; i < Cedula.length; i++){
			document.getElementById('Codigo').value = document.getElementById('Codigo').value+Cedula[i];
		}
}

function representante(a){ 
	if(a=="Madre"){
		document.getElementById('madre').style.display="none";
		document.getElementById('padre').style.display="inline";
	}else if(a=="Padre"){
		document.getElementById('padre').style.display="none";
		document.getElementById('madre').style.display="inline";
	}else if(a=="Otro"){
		document.getElementById('madre').style.display="inline";
		document.getElementById('padre').style.display="inline";
	}else if(a==""){
		document.getElementById('madre').style.display="none";
		document.getElementById('padre').style.display="none";
	}
}

function cedcod(a){ 
	if(a=="CI"){
		document.getElementById('CI').style.display="inline";
		document.getElementById('CE').style.display="none";
	}else if(a=="CE"){
		document.getElementById('CE').style.display="inline";
		document.getElementById('CI').style.display="none";
	}
}

function verifyInput(_selList,_textBox,pos) {
	document.getElementById('Cedula_r').readOnly = false;
	document.getElementById('Cedula_m').readOnly = false;
	document.getElementById('Cedula_p').readOnly = false;
	document.getElementById('Cedula_e').readOnly = false;
	var SI = eval(_selList+".selectedIndex");
	var SV = eval(_selList+".options[SI].value");
	eval(_textBox+".value = SV");
	var a = eval(_selList+".options.selectedIndex=0");
	if (pos=='0'){
		document.FormEstudiante.Cedula_r.focus();
	}else if (pos=='1'){
		document.FormEstudiante.Cedula_m.focus()
	}else if (pos=='2'){
		document.FormEstudiante.Cedula_p.focus()
	}else if (pos=='3'){
		document.FormEstudiante.Cedula_e.focus()
	}
} 

//pasar la cedula del representante por la url
function Pasar() {
   var cedula=document.FormEstudiante.Cedula_r.value;
   document.location='EstudianteNuevo.php?cedula='+cedula; 
}
</script>
</head>

<body>
<div id="wrap">
<div id="header">
<div id="hora">
<?php include("Hora.php"); ?>
</div>
<div id="topnav">
	<?php include("MenuSuperior.php"); ?>
</div>

</div>
<div id="content">
<div id="left">
<div class="post">
<div class="post_h">

</div>

<div class="postcontent">
<blockquote><h2 align="center">INSCRIPCION ESTUDIANTE NUEVO</h2></blockquote>
<form action="ResEstudianteNuevo.php" method="POST" id="FormEstudiante" name="FormEstudiante">

	<ul class="tabs">
		<li><a href="#tab1" title='Grupo Familiar'>G.F.</a></li>
		<li><a href="#tab2" title='Estudiante'>Est</a></li>
		<li><a href="#tab3" title='Aspectos de la vivienda'>Asp. V.</a></li>
		<li><a href="#tab4" title='Antecedentes del estudiante'>Ant. E.</a></li>
		<li><a href="#tab5" title='Conducta emocional'>C. E.</a></li>
		<li><a href="#tab6" title='Documentos asignados'>Doc. A.</a></li>
		<li><a href="#tab7" title='Grado a cursar'>Grado</a></li>
	</ul>

		<div id="tab1" class="tab_content">
			<br><br><br><br>
			<!--Representante-->
			<label><font color=#FF0000>(*) Campos obligatorios</font></label>
			<div align=center>
				<label style='color: #FF0000'>*</label> Representante legal del estudiante <select name='Representante' id='Representante' onChange="representante(this.value)"><option value=''></option>
														<option value='Madre'>Madre</option>
														<option value='Padre'>Padre</option>
														<option value='Otro'>Otro...</option></select>
			</div>
			<fieldset>
			<legend align=left><b><font size=2>REPRESENTANTE</font></b></legend>
			<table width=100% cellspacing=5 cellpadding=3 border=0>		
				
			<?php if($sql){
				while($row=mysql_fetch_array($sql)){
					echo "
				<tr>
					<td width=50%><label style='color: #FF0000'>*</label> C&eacute;dula de Identidad: </td><td><input name='Cedula_r2' id='Cedula_r2' value='$row[0]' readonly><label> Ej: 12345678</label></td>
				</tr>
				
				<tr>
					<td><label style='color: #FF0000'>*</label> Nombres: </td><td><input type=text name='Nombres_r' id='Nombres_r' value='$row[1]'><label> Ej: Maria Luisa</label></td>
				</tr>
				<tr>
					<td><label style='color: #FF0000'>*</label> Apellidos: </td><td><input type=text name='Apellidos_r' id='Apellidos_r' value='$row[2]'><label> Ej: P&eacute;rez Tovar</label></td>
				</tr>
				<tr>
					<td>Sexo: </td><td><select name='Sexo_r'><option></option>
												<option "; if ($row[3]=='Masculino'){ echo "Selected"; } echo ">Masculino</option>
												<option "; if ($row[3]=='Femenino'){ echo "Selected"; } echo ">Femenino</option></select></td>
				</tr>
				<tr>";
					$tlf = explode('-',$row[4]);
				echo "<td>Tel&eacute;fono Casa: </td><td><select name='T_casa_r'><option></option>
																<option "; if ($tlf[0]=='0240'){ echo "Selected"; } echo ">0240</option>
																<option "; if ($tlf[0]=='0241'){ echo "Selected"; } echo ">0241</option>
																<option "; if ($tlf[0]=='0242'){ echo "Selected"; } echo ">0242</option>
																<option "; if ($tlf[0]=='0243'){ echo "Selected"; } echo ">0243</option>
																<option "; if ($tlf[0]=='0244'){ echo "Selected"; } echo ">0244</option>
																<option "; if ($tlf[0]=='0412'){ echo "Selected"; } echo ">0412</option>
																<option "; if ($tlf[0]=='0414'){ echo "Selected"; } echo ">0414</option>
																<option "; if ($tlf[0]=='0424'){ echo "Selected"; } echo ">0424</option>
																<option "; if ($tlf[0]=='0416'){ echo "Selected"; } echo ">0416</option>
																<option "; if ($tlf[0]=='0426'){ echo "Selected"; } echo ">0426</option></select>
					<input type=text name='T_casa_r2' value='$tlf[1]' size=10 maxlength=7 onKeyPress='return acceptNum(event)'><label> Ej: 1234567</label></td>
				</tr>
				<tr>";
					$tlf2 = explode('-',$row[5]);
				echo "<td>Tel&eacute;fono M&oacute;vil: </td><td><select name='T_movil_r'><option></option>
																<option "; if ($tlf2[0]=='0412'){ echo "Selected"; } echo ">0412</option>
																<option "; if ($tlf2[0]=='0414'){ echo "Selected"; } echo ">0414</option>
																<option "; if ($tlf2[0]=='0424'){ echo "Selected"; } echo ">0424</option>
																<option "; if ($tlf2[0]=='0416'){ echo "Selected"; } echo ">0416</option>
																<option "; if ($tlf2[0]=='0426'){ echo "Selected"; } echo ">0426</option></select>
					<input type=text name='T_movil_r2' value='$tlf2[1]' size=10 maxlength=7 onKeyPress='return acceptNum(event)'><label> Ej: 1234567</label></td>
				</tr>
				<tr>
					<td>Oficio: </td><td><input type=text name='Oficio' value='$row[6]'><label> Ej: Obrero, Ama de casa...</label></td>
				</tr>
				<tr>
					<td>Lugar de trabajo: </td><td><input type=text name='Lugar_t_r' value='$row[7]' size=40><br><label> Ej: Conduven</label></td>
				</tr>
				<tr>
					<td>&iquest;Desea compartir alg&uacute;n saber?: </td><td><input type=text name='Saber_r' value='$row[8]' size=40><br><label> Ej: Conocimientos en carpinteria, pasteleria, etc.</label></td>
				</tr>
				<tr>
					<td>Parentesco: </td><td><select name='Parentesco_r'>
												<option></option>
												<option "; if ($row[9]=='Madre'){ echo "Selected"; } echo ">Madre</option>
												<option "; if ($row[9]=='Padre'){ echo "Selected"; } echo ">Padre</option>
												<option "; if ($row[9]=='Tio(a)'){ echo "Selected"; } echo ">Tio(a)</option>
												<option "; if ($row[9]=='Abuelo(a)'){ echo "Selected"; } echo ">Abuelo(a)</option>
												<option "; if ($row[9]=='Otro...'){ echo "Selected"; } echo ">Otro...</option></select>
						<label> Ej: Madre, Padre, Otro...</label></td>
				</tr>
				<tr>
					<td>Direcci&oacute;n: </td><td><input type=text name='Direccion_r' size=40 value='$row[10]'><br><label> Ej: Calle sur, sector B casa nro 14</label></td>
				</tr>";
				}
				} else if(!$sql) {
					echo "
				<tr>
					<td width=50%><label style='color: #FF0000'>*</label> C&eacute;dula de Identidad: </td><td><select name='Nac_r' onchange=\"verifyInput('document.FormEstudiante.Nac_r','document.FormEstudiante.Cedula_r','0')\"><option></option><option value='V-'>V-</option><option value='E-'>E-</option></select><input name='Cedula_r' id='Cedula_r' onKeyUp='comprobar_r(this.value)' onKeyPress='return acceptNum(event)' size=8 id='Cedula_r' maxlength=10 readonly><a href='#' title='Buscar' onclick='Pasar();'><img src='images/lupa.jpg' width=20 height=20 align=top></a><label> Ej: 12345678</label>&nbsp;&nbsp;<span id='comprobar_mensaje_r'></span></td>
				</tr>				
				<tr>
					<td><label style='color: #FF0000'>*</label> Nombres: </td><td><input type=text name='Nombres_r' id='Nombres_r'><label> Ej: Maria Luisa</label></td>
				</tr>
				<tr>
					<td><label style='color: #FF0000'>*</label> Apellidos: </td><td><input type=text name='Apellidos_r' id='Apellidos_r'><label> Ej: P&eacute;rez Tovar</label></td>
				</tr>
				<tr>
					<td>Sexo: </td><td><select name='Sexo_r' id='Sexo_r'><option></option><option>Masculino</option><option>Femenino</option></select></td>
				</tr>
				<tr>
					<td>Tel&eacute;fono Casa: </td><td><select name='T_casa_r' id='T_casa_r'><option></option>
																<option>0240</option>
																<option>0241</option>
																<option>0242</option>
																<option>0243</option>
																<option>0244</option>
																<option>0412</option>
																<option>0414</option>
																<option>0424</option>
																<option>0416</option>
																<option>0426</option></select>
					<input type=text name='T_casa_r2' id='T_casa_r2' size=10 maxlength=7 onKeyPress='return acceptNum(event)'><label> Ej: 1234567</label></td>
				</tr>
				<tr>
					<td>Tel&eacute;fono M&oacute;vil: </td><td><select name='T_movil_r' id='T_movil_r'><option></option>
																<option>0412</option>
																<option>0414</option>
																<option>0424</option>
																<option>0416</option>
																<option>0426</option></select>
					<input type=text name='T_movil_r2' id='T_movil_r2' size=10 maxlength=7 onKeyPress='return acceptNum(event)'><label> Ej: 1234567</label></td>
				</tr>
				<tr>
					<td>Oficio: </td><td><input type=text name='Oficio' id='Oficio'><label> Ej: Obrero, Ama de casa...</label></td>
				</tr>
				<tr>
					<td>Lugar de trabajo: </td><td><input type=text name='Lugar_t_r' id='Lugar_t_r' size=40><br><label> Ej: Conduven</label></td>
				</tr>
				<tr>
					<td>&iquest;Desea compartir alg&uacute;n saber?: </td><td><input type=text name='Saber_r' id='Saber_r' size=40><br><label> Ej: Conocimientos en carpinteria, pasteleria, etc.</label></td>
				</tr>
				<tr>
					<td>Parentesco: </td><td><select name='Parentesco_r' id='Parentesco_r'>
												<option></option>
												<option>Madre</option>
												<option>Padre</option>
												<option>Tio(a)</option>
												<option>Abuelo(a)</option>
												<option>Otro...</option></select>
						<label> Ej: Madre, Padre, Otro...</label></td>
				</tr>
				<tr>
					<td>Direcci&oacute;n: </td><td><input type=text name='Direccion_r' id='Direccion_r' size=40><br><label> Ej: Calle sur, sector B casa nro 14</label></td>
				</tr>";
				 } ?>	
			</table>
			</fieldset>
			
<div class="post">
<span></span></div>

		<!--Madre-->			
		<div id=madre style="display: none;">
			<fieldset>
			<legend align=left><b><font size=2>MADRE</font></b></legend>
				<table width=100% cellspacing=5 cellpadding=3 border=0>
					<tr>
						<td width=50%><label style='color: #FF0000'>*</label> C&eacute;dula de Identidad: </td><td><select name='Nac_m' onchange="verifyInput('document.FormEstudiante.Nac_m','document.FormEstudiante.Cedula_m','1')"><option></option><option value='V-'>V-</option><option value='E-'>E-</option></select><input name='Cedula_m' id='Cedula_m' onKeyPress='return acceptNum(event)' size=13 maxlength=10 readonly><label> Ej: 12345678</label></td>
					</tr>
					<tr>
						<td><label style='color: #FF0000'>*</label> Nombres: </td><td><input type=text name='Nombres_m' id='Nombres_m'><label> Ej: Maria Luisa</label></td>
					</tr>
					<tr>
						<td><label style='color: #FF0000'>*</label> Apellidos: </td><td><input type=text name='Apellidos_m' id='Apellidos_m'><label> Ej: P&eacute;rez Tovar</label></td>
					</tr>
					<tr>
						<td>Tel&eacute;fono Casa: </td><td><select name='T_casa_m' id='T_casa_m'><option></option>
																	<option>0240</option>
																	<option>0241</option>
																	<option>0242</option>
																	<option>0243</option>
																	<option>0244</option>
																	<option>0412</option>
																	<option>0414</option>
																	<option>0424</option>
																	<option>0416</option>
																	<option>0426</option></select>
						<input type=text name='T_casa_m2' id='T_casa_m2' size=10 maxlength=7 onKeyPress='return acceptNum(event)'><label> Ej: 1234567</label></td>
					</tr>
					<tr>
						<td>Tel&eacute;fono M&oacute;vil: </td><td><select name='T_movil_m' id='T_movil_m'><option></option>
																	<option>0412</option>
																	<option>0414</option>
																	<option>0424</option>
																	<option>0416</option>
																	<option>0426</option></select>
						<input type=text name='T_movil_m2' id='T_movil_m2' size=10 maxlength=7 onKeyPress='return acceptNum(event)'><label> Ej: 1234567</label></td>
					</tr>
					<tr>
						<td>Profesi&oacute;n u Oficio: </td><td><input type=text name='Oficio_m' id='Oficio_m'><label> Ej: Obrero, Ama de casa...</label></td>
					</tr>
					<tr>
						<td>Lugar de trabajo: </td><td><input type=text name='Lugar_t_m' id='Lugar_t_m' size=40><br><label> Ej: Zapateria Box</label></td>
					</tr>
					<tr>
						<td>&iquest;Desea compartir alg&uacute;n saber?: </td><td><input type=text name='Saber_m' id='Saber_m' size=40><br><label> Ej: Conocimientos en carpinteria, pasteleria, etc.</label></td>
					</tr>
					<tr>
						<td>Direcci&oacute;n: </td><td><input type=text name='Direccion_m' id='Direccion_m' size=40><br><label> Ej: Calle sur, sector B casa nro 14</label></td>
					</tr>
					<tr>
						<td>&iquest;Est&aacute; vivo? </td><td><input type=checkbox name='Vive_m' value=Si>Si &nbsp;<input type=checkbox name='Vive_m' value=No>No</td>
					</tr>
					<tr>
						<td>&iquest;Vive con el ni&ntilde;o? </td><td><input type=checkbox name='Vive_n_m' value=Si>Si &nbsp;<input type=checkbox name='Vive_n_m' value=No>No</td>
					</tr>
				</table>
			</fieldset>
		</div>

<div class="post">
<span></span></div>
			
		<!--Padre-->			
		<div id=padre style="display: none;">
			<fieldset>
			<legend align=left><b><font size=2>PADRE</font></b></legend>
				<table width=100% cellspacing=5 cellpadding=3 border=0>
					<tr>
					<td width=50%><label style='color: #FF0000'>*</label> C&eacute;dula de Identidad: </td><td><select name='Nac_p' onchange="verifyInput('document.FormEstudiante.Nac_p','document.FormEstudiante.Cedula_p','2')"><option></option><option value='V-'>V-</option><option value='E-'>E-</option></select><input name='Cedula_p' id='Cedula_p' onKeyPress='return acceptNum(event)' size=13 maxlength=10 readonly><label> Ej: 12345678</label></td>
				</tr>
				
				<tr>
					<td><label style='color: #FF0000'>*</label> Nombres: </td><td><input type=text name='Nombres_p' id='Nombres_p'><label> Ej: Maria Luisa</label></td>
				</tr>
				<tr>
					<td><label style='color: #FF0000'>*</label> Apellidos: </td><td><input type=text name='Apellidos_p' id='Apellidos_p'><label> Ej: P&eacute;rez Tovar</label></td>
				</tr>
				<tr>
					<td>Tel&eacute;fono Casa: </td><td><select name='T_casa_p' id='T_casa_p'><option></option>
																<option>0240</option>
																<option>0241</option>
																<option>0242</option>
																<option>0243</option>
																<option>0244</option>
																<option>0412</option>
																<option>0414</option>
																<option>0424</option>
																<option>0416</option>
																<option>0426</option></select>
					<input type=text name='T_casa_p2' id='T_casa_p2' size=10 maxlength=7 onKeyPress='return acceptNum(event)'><label> Ej: 1234567</label></td>
				</tr>
				<tr>
					<td>Tel&eacute;fono M&oacute;vil: </td><td><select name='T_movil_p' id='T_movil_p'><option></option>
																<option>0412</option>
																<option>0414</option>
																<option>0424</option>
																<option>0416</option>
																<option>0426</option></select>
					<input type=text name='T_movil_p2' id='T_movil_p2' size=10 maxlength=7 onKeyPress='return acceptNum(event)'><label> Ej: 1234567</label></td>
				</tr>
				<tr>
					<td>Profesi&oacute;n u Oficio: </td><td><input type=text name='Oficio_p' id='Oficio_p'><label> Ej: Obrero, Ama de casa...</label></td>
				</tr>
				<tr>
					<td>Lugar de trabajo: </td><td><input type=text name='Lugar_t_p' id='Lugar_t_p' size=40><br><label> Ej: Conduven</label></td>
				</tr>
				<tr>
					<td>&iquest;Desea compartir alg&uacute;n saber?: </td><td><input type=text name='Saber_p' id='Saber_p' size=40><br><label> Ej: Conocimientos en carpinteria, pasteleria, etc.</label></td>
				</tr>
				<tr>
					<td>Direcci&oacute;n: </td><td><input type=text name='Direccion_p' id='Direccion_p' size=40><br><label> Ej: Calle sur, sector B casa nro 14</label></td>
				</tr>
				<tr>
					<td>&iquest;Est&aacute; vivo? </td><td><input type=checkbox name='Vive_p' value=Si>Si &nbsp;<input type=checkbox name='Vive_p' value=No>No</td>
				</tr>
				<tr>
					<td>&iquest;Vive con el ni&ntilde;o? </td><td><input type=checkbox name='Vive_n_p' value=Si>Si &nbsp;<input type=checkbox name='Vive_n_p' value=No>No</td>
				</tr>
			</table>
			</fieldset>
		</div>
	</div>
		
		<div id="tab2" class="tab_content">
			<br><br><br><br>
			<!--Estudiante-->
			<label><font color=#FF0000>(*) Campos obligatorios</font></label><br>
			<label><font color=#FF0000>Nota: Para generar el C&oacute;digo Escolar debe indicar primero la C.I. del representante y luego seleccionar la Fecha Nac. del estudiante y por &uacute;ltimo dar clic en el campo del C&oacute;digo Escolar</font></label>
			<fieldset>
			<legend align=left><b><font size=2>ESTUDIANTE</font></b></legend>
			<table width=100% cellspacing=5 cellpadding=3 border=0>
				<tr>
					<td>Periodo: </td><td><?php if(date(m)>=8){ $anio=date(Y); $anio2=$anio+1; echo "$anio - $anio2"; } else{ $anio=date(Y)-1; $anio2=$anio+1; echo "$anio - $anio2"; } ?></td>
						<input type=hidden name='Periodo' id='Periodo' value='<?php if(date(m)>=8){ $anio=date(Y); $anio2=$anio+1; echo "$anio - $anio2"; } else{ $anio=date(Y)-1; $anio2=$anio+1; echo "$anio - $anio2"; } ?>'>
				</tr>
				<tr>
					<td width=50%><label style='color: #FF0000'>*</label> <input type=radio checked name="CICE" id="CICE" value='CE' onClick="cedcod(this.value)">C&oacute;digo Escolar <input type=radio name="CICE" id="CICE2" value='CI' onClick="cedcod(this.value)">C.I.: </td><td><div id='CE' style="display: inline;"><input type=text name="Codigo" id="Codigo" maxlength=12 onKeyPress="return acceptNum(event)" onFocus="javascript: if(document.getElementById('Cedula_r').value != ''){ CedulaEscolar(document.getElementById('Cedula_r').value); } else { CedulaEscolar(document.getElementById('Cedula_r2').value); }"><label> Ej: 050112345678</label></div><div id='CI' style="display: none;"><select name='Nac_e' onchange="verifyInput('document.FormEstudiante.Nac_e','document.FormEstudiante.Cedula_e','3')"><option></option><option>V-</option><option>E-</option></select><input readonly type=text name='Cedula_e' id='Cedula_e' size=8 maxLength=10 onKeyPress='return acceptNum(event)'><label> Ej: V-12345678</label></div></td>
				</tr>
				<tr>
					<td><label style='color: #FF0000'>*</label> Nombres: </td><td><input type=text name="Nombres" id="Nombres"><label> Ej: Carlos Luis</label></td>
				</tr>
				<tr>
					<td><label style='color: #FF0000'>*</label> Apellidos: </td><td><input type=text name="Apellidos" id="Apellidos"><label> Ej: P&eacute;rez Tovar</label></td>
				</tr>
				<tr>
					<td>Sexo: </td><td><select name="Sexo" id="Sexo"><option></option><option>Masculino</option><option>Femenino</option></select></td>
				</tr>
				<tr>
					<td><label style='color: #FF0000'>*</label> Fecha Nac. </td><td><input readonly type=text id="calendar-inputField" name="F_nac" maxlength=13 onKeyPress="return acceptNum(event)"> <!--onChange="\edad_alumno(document.getElementById('calendar-inputField').value);\"--><img src="images/calendar.gif" id="calendar-trigger" align=top>
						<script>
							Calendar.setup({
								trigger    : "calendar-trigger",
								inputField : "calendar-inputField",
								dateFormat	 : "%d - %m - %Y",
								max: <?php $ano=date(Y)-5; $mes=12; $dia=31; echo $ano.$mes.$dia; ?>,
								onSelect   : function() { this.hide() }
							});
						</script>
				</tr>
				<tr>
					<td>Lugar de Nacimiento: </td><td><input type=text name="L_nac" id="L_nac"><label> Ej: Caracas, Chacao</label></td>
				</tr>
				<tr>
					<td>Religion: </td><td><select name="Religion" id="Religion">
												<option></option>
												<option>Cat&oacute;lico</option>
												<option>Evangelico</option>
												<option>Ateo</option>
												<option>Jud&iacute;o</option>
												<option>Otro...</option></select><label> Ej: Cat&oacute;lico, Evangelico, Otro...</label></td>
				</tr>
				<tr>
					<td>Direcci&oacute;n: </td><td><input type=text size=40 name="Direccion" id="Direccion"><br><label> Ej: Calle sur, sector B casa nro 14</label></td>
				</tr>
				<tr>
					<td>Lugar que ocupa entre sus hermanos: </td><td><select name="Lug_hermanos">
																				<option></option>
																				<option>1</option>
																				<option>2</option>
																				<option>3</option>
																				<option>4</option>
																				<option>5</option>
																				<option>6</option>
																				<option>7</option></select></td>
				</tr>
				<tr>
					<td>Tiene hermanos en la institucion: </td><td><input type=checkbox name="H_inst" value='Si'>Si <input type=checkbox name="H_inst" value='No'>No</td>
				</tr>
				<tr>
					<td>Escribe con la mano: </td><td><select name='Mano'>
																<option></option>
																<option>Izquierda</option>
																<option>Derecha</option>
																<option>Ambidiestra</option></select></td>
				</tr>
				<tr>
					<td>Posee beca: </td><td><input type=checkbox name="Beca" value='Si'>Si <input type=checkbox name="Beca" value='No'>No</td>
				</tr>
				<tr>
					<td>Practica algun deporte o actividad cultural: </td><td><select name='Deporte'>
																							<option></option>
																							<option value='No'>No</option>
																							<option value='Beisbol'>Beisbol</option>
																							<option value='Futbol'>Futbol</option>
																							<option value='Voleibol'>Voleibol</option>
																							<option value='Basquetbol'>Basquetbol</option>
																							<option value='Karate'>Karate</option>
																							<option value='Natacion'>Nataci&oacute;n</option>
																							<option value='Otro'>Otro...</option></select></td>
				</tr>				<tr>
					<td>Posee control medico? </td><td><select name='C_medico'>
																	<option></option>
																	<option value='No'>No</option>
																	<option value='Neurologico'>Neurol&oacute;gico</option>
																	<option value='Psicologico'>Psicol&oacute;gico</option>
																	<option value='Otro'>Otro...</option></select></td>
				</tr>
				<tr>
					<td>Presenta dificultad: </td><td><select name='Dificultad'>
																		<option></option>
																		<option value='No'>No</option>
																		<option value='Visual'>Visual</option>
																		<option value='Auditiva'>Auditiva</option>
																		<option value='Ortopedica'>Ortop&eacute;dica</option>
																		<option value='Otro'>Otro...</option></select></td>
				</tr>
			</table>
			</fieldset>
		</div>
		
		<div id="tab3" class="tab_content">
			<br><br><br><br>
			<!--Aspectos de la vivienda-->
			<!--<label><font color=#FF0000>(*) Campos obligatorios</font></label>-->
			<fieldset>
			<legend align=left><b><font size=2>ASPECTOS DE LA VIVIENDA</font></b></legend>
			<table width=100% cellspacing=5 cellpadding=3 border=0>
				<tr>
					<td>Tipo de vivienda: </td><td width=50% colspan=3><select name='T_vivienda'><option></option><option value='Casa'>Casa</option><option value='Departamento'>Departamento</option><option value='Otro'>Otro...</option></select></td>
				</tr>
				<tr>
					<td>Nro de habitacion: </td><td width=50% colspan=3><input type=text size=5 name='nro_hab'></td>
				</tr>
				<tr>
					<td>Nro de personas que la habitan: </td><td width=50% colspan=3><input type=text size=5 name='nro_p'></td>
				</tr>
				<tr>
					<td>Posee: </td><td colspan=3><input type=checkbox name="P_luz" value='Si'>Luz <input type=checkbox name="P_agua" value='Si'>Agua <input type=checkbox name="P_cloacas" value='Si'>Cloacas <br><input type=checkbox name="P_gas" value='Si'>Gas <input type=checkbox name="P_bano" value='Si'>Ba&ntilde;o </td>
				</tr>
				<tr>
					<td>Condici&oacute;n: </td><td width=50% colspan=3><select name='Condicion'><option></option><option value='Propia'>Propia</option><option value='Alquilada'>Alquilada</option><option value='Otro'>Otro...</option></select></td>
				</tr>
			</table>
			</fieldset>
		</div>
		
		<div id="tab4" class="tab_content">
			<br><br><br><br>
			<!--Antecedentes del estudiante-->
			<!--<label><font color=#FF0000>(*) Campos obligatorios</font></label>-->
			<fieldset>
			<legend align=left><b>ANTECEDENTES DEL ESTUDIANTE</b></legend>
			<center>
			<table width=100% cellspacing=5 cellpadding=0 border=0 id='field'>
				<tr>
					<td>El parto fue: </td><td width=50% colspan=3><select name='Parto'>
																		<option></option>
																		<option value='Normal'>Normal</option>
																		<option value='Cesarea'>Ces&aacute;rea</option></select></td>
				</tr>
				<tr>
					<td>Presento algun problema al nacer: </td><td width=50% colspan=3><input type=checkbox name="P_nacer" value='Si'>Si <input type=checkbox name="P_nacer" value='No'>No &nbsp;&nbsp;Especifique:<textarea rows=2 cols=30 name='P_nacer_e'></textarea></td>
				</tr>
				<tr>
					<td>Asiste control pediatrico: </td><td width=50% colspan=3><input type=checkbox name="C_ped" value='Si'>Si <input type=checkbox name="C_ped" value='No'>No</td>
				</tr>
				<tr><td><br></td></tr>
				<tr>
					<td align=center colspan=4><a href=# onclick='crear(this)'>A&ntilde;adir Enfermedades <img src='images/agregar.jpg' align=top></a></td>
				</tr>
				<tr>
					<td align=center colspan=4>Nombre: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Descripci&oacute;n:</td>
				</tr>
			</table>
			</center>
			</fieldset>
			
			<div class="post">
			<span></span></div>
		</div>
		
		<div id="tab5" class="tab_content">
			<br><br><br><br>
			<!--Conducta Emocional-->
			<!--<label><font color=#FF0000>(*) Campos obligatorios</font></label>-->
			<fieldset>
			<legend align=left><b>CONDUCTA EMOCIONAL</b></legend>
			<table width=100% cellspacing=5 cellpadding=3 border=0>
				<tr>
					<td>Como describir&iacute;a al estudiante: </td><td width=50%><input type=checkbox name='Desc_est_tranq' value='Si'> Tranquilo(a)
																					<input type=checkbox name='Desc_est_ti' value='Si'> Timido(a)<br>
																					<input type=checkbox name='Desc_est_ca' value='Si'> Cari&ntilde;oso(a)&nbsp;
																					<input type=checkbox name='Desc_est_in' value='Si'> Inquieto(a)<br>
																					<input type=checkbox name='Desc_est_ex' value='Si'> Extrovertido(a)</td>
				</tr>
				<tr>
					<td>Cuando sancionan al ni&ntilde;o(a)  por lo general, se ponen de acuerdo los padres? </td><td width=50% colspan=3><input type=checkbox name="C_Sancion" value='Si'>Si <input type=checkbox name="C_Sancion" value='No'>No</td>
				</tr>
				<tr>
					<td>Que tipo de sanci&oacute;n aplican? </td><td width=50%><input type=checkbox name='Sancion_f' value='Si'> Formativa
																				<input type=checkbox name='Sancion_c' value='Si'> Corporal</td>
				</tr>
				<tr>
					<td>Que hace Ud. cuando el ni&ntilde;o(a) miente? </td><td><textarea rows='1' cols='30' name='C_miente'></textarea></td>
				</tr>
				<tr>
					<td>Acostumbra con sus  hijos a: </td><td width=50%><input type=checkbox name='Acostumbra_j' value='Si'> Jugar
																		<input type=checkbox name='Acostumbra_c' value='Si'> Conversar
																		<input type=checkbox name='Acostumbra_lc' value='Si'> Leer cuentos</td>
				</tr>
				<tr>
					<td>Tiempo que le dedica cada uno de los padres al d&iacute;a </td><td> Madre: <input type=text size=29 name='T_dedicado_m'><br>Padre: <input type=text size=29 name='T_dedicado_p'></td>
				</tr>
				<tr>
					<td>Realiza viajes o paseos frecuentes </td><td><input type=checkbox name="R_viaje" value='Si'>Si <input type=checkbox name="R_viaje" value='No'>No &nbsp;A donde? <input type=text size=15 name='R_viaje_e'></td>
				</tr>
			</table>
			</fieldset>
		</div>
		
		
		
		<div id="tab6" class="tab_content">
			<br><br><br><br>
			<!--Doc. Asignados-->
			<fieldset>
			<legend align=left><b>DOCUMENTOS ASIGNADOS</b></legend>
			<table width=100% cellspacing=5 cellpadding=0 border=0>				
				<tr>
					<td><input type=checkbox name="Copia_ced_rep"> Copia C&eacute;dula Representante</td>
					<td><input type=checkbox name="Fotos_rep"> Fotos del Representante</td>
					<td><input type=checkbox name="Fotos_est"> Fotos del Estudiante</td>
				</tr>
				<tr>
					<td><input type=checkbox name="Partida_nac"> Partida de Nacimiento</td>
					<td><input type=checkbox name="Copia_ced_est"> Copia C&eacute;dula Estudiante</td>
					<td><input type=checkbox name="Certificacion_vac"> Certificaci&oacute;n de Vacunas</td>				
				</tr>
				<tr>
					<td><input type=checkbox name="Certificacion_apren"> Certificaci&oacute;n de Aprendizaje</td>
				</tr>
			</table>
			</fieldset>
		</div>
		
		<div id="tab7" class="tab_content">
			<br><br><br><br>
			<!--Grado a cursar-->
			<table width=100% border=0>
				<tr>
					<td><label><font color=#FF0000>(*) Campos obligatorios</font></label></td>
					<td align=right><label><font color=#FF0000>Cant. M&aacute;x. Estudiantes 30</font></label></td>
				</tr>
			</table>
			<fieldset>
			<legend align=left><b>GRADO A CURSAR</b></legend>
			<table width=100% cellspacing=5 cellpadding=0 border=0>				
				<tr>
					<td width=40%><label style='color: #FF0000'>*</label> Grado/Secci&oacute;n: </td><td width=32%><select name="Grado" id="Grado"><option value=''>Grado</option><option>Primer</option><option>Segundo</option><option>Tercer</option><option>Cuarto</option><option>Quinto</option><option>Sexto</option></select>
										<select name="Seccion" id="Seccion" onChange="javascript: buscar_docente(document.getElementById('Grado').value, document.getElementById('Seccion').value, document.getElementById('Periodo').value); buscar_alumno(document.getElementById('Grado').value, document.getElementById('Seccion').value, document.getElementById('Periodo').value);">
											<option value=''>Secci&oacute;n</option>
											<option>A</option>
											<option>B</option>
											<option>C</option>
											<option>D</option>
											<option>E</option></select></td>
					<td align=center><div id="datos_alumno"></div></td></td>
				</tr>
				<tr>
					<td>Profesor encargado: </td><td colspan=2><div id="datos_docente"></div></td>
				</tr>
			</table>
			</fieldset>
			
			<div class="post">
			<span></span></div>

			<div name=botonera align=center>
			<input id="Guardar" class=button type=Submit value=Guardar><input class=button type=button value=Cancelar onClick="location='index.php'">
			</div>
			</form>
		</div>
		
<div align=right><a title='Ayuda' href="Manuales/ManualUsuario_2.1.pdf" onclick="window.open(this.href,'Manual','params'); return false"><img src='images/help.png' width=8% height=15%></a></div>

</div>
<div class="post_b">
<span></span></div>
</div>


</div>

<div class="post">
<div class="post_h">

</div>


</div>

<?php include("Menu.php"); ?>

<div class="clear"></div>
</div>
<div id="pagebottom"></div>

<div id="footer">
<P>&reg; Derechos Reservados @ CopyRight. 2011-2012</P>
<p>Programadores: Quintero E, Isturiz C, Uribe C, De Freitas J.</p>
</div>
</div>
</body>
</html>
